import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { getSingleStore } from '@ds/ds-micro-lib/dist';

@Component({
  selector: 'app-business-list',
  templateUrl: './business-list.component.html',
  styleUrls: ['./business-list.component.less']
})
export class BusinessListComponent implements OnInit {

  value = null;
  constructor(
    private  cdr: ChangeDetectorRef
  ) { }

  ngOnInit(): void {
    console.log('*******', getSingleStore())
    getSingleStore().subscribe(v =>  {
      console.log('business内部变化:', v, this.value);
      this.value  = v?.data;
      this.cdr.detectChanges();
    })
  
  }

  valueChange(ev) {
    getSingleStore().next({data: ev});
  }

}
